﻿
namespace WXWorkSvc.Pages;

public class IndexModel : PageModel
{

    public void OnGet()
    {
     
        //ILogger<IndexModel> logger
        //[FromServices] Cryptography cryptography
        //S(cryptography);
        //await Task.Delay(1);
        //   var ret = await wx.GetCorpAuthInfoAsync("ww42dc3a783ec7a139", "ww5983d51bcf326a5f");
    }

    //private void S(Cryptography cryptography)
    //{
    //    var str = "x2/Z/4gg9sAjcGAo2OaIrtyD+959wT8G9/zZTdfgRaS/UxIKd6WaXxFot1/oSaSQu0mh6yq1ozTZeU8WUBcJKWjzxCLakcgXDMejKALXMdmU3ywx6k/86bnUV3ne8P8rVZJsVFKKzxijqNxiALNjuemkqCH6fFjMEwQ5ohlolX+bjUaWtoTPt+SmvIeDcTdmN9DpJz9sCQthIEyDHv1DeNdzHRDWE0o1fhe4GxDvHgD8IKHJJadgz3JlK8w1sGl7VkrRcQCME0CD/y4X6ztHk0roQoAXEAZnCQddD06JJ3TT73hVqLAa3xBNj+Y5W5NlyNiG3PpzezSeoq49tai/+g==";
    //    var bytes = Convert.FromBase64String(str).AesDecrypt(cryptography._Key, cryptography._IV);
    //    var lenBytes = new Span<byte>(bytes, 16, 4);
    //    lenBytes.Reverse();
    //    var len = BitConverter.ToInt32(lenBytes);
    //    var decryptMsg = Encoding.UTF8.GetString(bytes.Skip(20).Take(len).ToArray());
    //    var receiveId = Encoding.UTF8.GetString(bytes.Skip(20 + len).ToArray());

    //}
}
